<template>
	<view>
		<u-navbar title-color="#fff" back-icon-color="#fff" :borderBottom="false" titleColor="#000000" backIconSize="40"
			:background="background"> </u-navbar>
		<view class="page">
			<image src="../static/f1.png" class="top"></image>
			<view class="icon" @click="seeImage(img_pre+info.details_icon)">
				<image src="../static/f3.png" mode=""></image>
			</view>
			<image :src="img_pre+info.icon" class="goods"></image>
		</view>
		<view class="title">
			{{info.name}}
		</view>
		<view class="content">
			<view class="name">
				<image src="../static/f4.png" mode=""></image>
			</view>
			<view class="text">
				{{info.describe}}
			</view>
		</view>

		<view class="button">
			<u-button type="primary" class="b1" @click="getWelfare">马上领取</u-button>
		</view>
	</view>
</template>

<script>
	var than;
	export default {
		data() {
			return {
				background: {
					'background': 'transparent'
				},
				timeout: 100,
				info: {}
			}
		},
		onLoad(option) {
			than = this;
			than.post("api/Novice_goods/welfare", null, function(data) {
				than.info = data;
			})
		},
		methods: {
			getWelfare() {
				this.$u.debounce(this.getResult, this.timeout, false);
			},
			getResult() {
				than.post("api/Novice_goods/getWelfare", null, function(data) {
					than.toast('领取成功')
				})
			},
		}
	}
</script>

<style lang="less">
	.top {
		width: 100%;
		height: 472rpx;

	}

	page {
		background: #C50000;
	}

	.button {
		padding-top: 42rpx;

		.b1 {
			font-size: 36rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: #D30000;
			width: 282rpx;
			height: 88rpx;
			background: linear-gradient(180deg, #E7C08B, #F9EBD4);
			border-radius: 44rpx;
		}
	}

	.content {
		.name {
			margin: auto auto;
			width: 264rpx;
			height: 58rpx;
			border: 2rpx solid #FACD89;
			background: linear-gradient(182deg, #F24949 0%, #C82328 100%);
			border-radius: 29rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			position: relative;
			z-index: 1;

			image {
				width: 153rpx;
				height: 30rpx;
			}
		}

		.text {
			margin: -25rpx auto 0;
			padding: 65rpx 59rpx 59rpx;
			width: 635rpx;
			border: 2rpx solid #FACD89;
			background: linear-gradient(156deg, #F45458 0%, #AB0E0A 100%);
			border-radius: 13rpx;
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: #FDD5C3;
		}
	}

	.page {
		position: absolute;
		top: 0;
		width: 100%;
		height: 1150rpx;
		background-image: url(../static/f2.png);
		background-size: 100% 100%;
		text-align: center;
		/* #ifdef APP-PLUS */
		padding-top: calc(0rpx + var(--status-bar-height));
		/* #endif */
		/* #ifdef H5 */
		padding-top: 0;

		/* #endif */
		.icon {
			display: flex;
			align-items: center;
			margin-top: -90rpx;

			image {
				margin-left: auto;
				width: 147rpx;
				height: 54rpx;
			}
		}

		.goods {
			margin-top: 20rpx;
			width: 568rpx;
			height: 568rpx;
		}
	}

	.title {

		/* #ifdef APP-PLUS */
		margin-top: calc(1000rpx - var(--status-bar-height));
		/* #endif */
		/* #ifdef H5 */
		margin-top: 1000rpx;
		/* #endif */
		font-size: 48rpx;
		font-family: FZLanTingHeiS-H-GB;
		font-weight: 400;
		color: #BD4D34;
		line-height: 104rpx;
		background: linear-gradient(0deg, #FDFAEB 0%, #F9F5D8 100%);
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		text-align: center;
		position: relative;
		z-index: 1;
	}
</style>
